<!--数字-->
<template>
  <el-input-number
    v-model="value"
    v-bind="extend"
    :id="'c' + columnId"
    :name="'c' + columnId"
    :size="size"
    :controls-position="extend['controls-position']??'right'"
    :clearable="clearable"
  >
  </el-input-number>
</template>

<script>
  import { defineComponent } from 'vue'
  import { ElInputNumber } from 'element-plus'
  // 引入组件需要的属性 引入表单子控件的管理类
  import { itemProps, itemController } from '../../map'

export default defineComponent({
  name: 'el-from-item-number',
  inheritAttrs: false,
  components: {
    ElInputNumber
  },
  props: {
    ...itemProps, // 基础属性
    'controls-position': {
      type: String,
      default: 'right'
    },
    modelValue: [String, Number]
  },
  emits: ['update:modelValue'],
  setup (props, context) {

    return {
      ...itemController(props, context.emit)
    }
  }
})
</script>
